package bg.btanev.eightyfour.shared.dto.experience;

import java.util.Date;

import bg.btanev.eightyfour.shared.dto.dtobase.DomainDtoValue;

/**
 *
 * @author B.Tanev
 *
 */
public class ExperiencePeriodDto implements DomainDtoValue, Comparable<ExperiencePeriodDto> {
	private Date begin;
	private Date end;

	protected ExperiencePeriodDto() {
		super();
	}

	public boolean isOpenEnded() {
		return this.end != null;
	}

	public Date getBeginDate() {
		return begin;
	}

	public Date getEndDate() {
		return end;
	}

	@Override
	public int compareTo(ExperiencePeriodDto o) {
		return this.begin.compareTo(o.begin);
	}
}
